package com.yanq.liancar.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.ServiceDetailsBean;

import java.util.List;

public class ServiceDetailsAdapter extends BaseQuickAdapter<ServiceDetailsBean.DataBean.FilesBean,BaseViewHolder> {
    public ServiceDetailsAdapter(int layoutResId, @Nullable List<ServiceDetailsBean.DataBean.FilesBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceDetailsBean.DataBean.FilesBean item) {
        ImageView imageView=helper.getView(R.id.img_servicedetails);
        RequestOptions options=new RequestOptions();
        options.error(R.mipmap.shop_bg);
        Glide.with(mContext).load(item.getWebPath()).apply(options).into(imageView);
    }
}
